package com.yanqu.road.logic.sort;

import com.yanqu.road.entity.activity.operamask.OperaMaskSceneRank;

import java.util.Comparator;

public class OperaMaskSceneRankSort implements Comparator<OperaMaskSceneRank> {
    @Override
    public int compare(OperaMaskSceneRank o1, OperaMaskSceneRank o2) {
        // 分数高
        if (o2.getScore() != o1.getScore()) {
            return Long.compare(o2.getScore(), o1.getScore());
        }
        // 时间早
        return Long.compare(o1.getTime(), o2.getTime());
    }
}
